const fs = require('fs');
const child_process = require('child_process');

for (var i = 0; i<3; i++) {
	var wp = child_process.spawn('node', ['demo30childProcess.js', i]);
	wp.stdout.on('data', data => {console.log('stdout =>', data.toString());});
	wp.stderr.on('data', data => console.log('stderr =>', data));
	wp.on('close', code => console.log('sub process exit =>', code));
}
